i2c: bcm2835: Can't support I2C_M_IGNORE_NAK
authorNoralf Trønnes <noralf@tronnes.org>
Thu, 22 Sep 2016 20:05:50 +0000 (22:05 +0200)
committerRaspbian kernel package updater <root@raspbian.org>
Thu, 15 Feb 2018 17:28:33 +0000 (17:28 +0000)
commit1d3d9d4c7666bda49eb278f4b7871587eea87685
treed594a13eb016e32f0625c8736f8cae4d141666d1
parentb77429dc05873965119de749b271641ed9082a89
i2c: bcm2835: Can't support I2C_M_IGNORE_NAK

The controller can't support this flag, so remove it.

Documentation/i2c/i2c-protocol states that all of the message is sent:

I2C_M_IGNORE_NAK:
    Normally message is interrupted immediately if there is [NA] from the
    client. Setting this flag treats any [NA] as [A], and all of
    message is sent.

From the BCM2835 ARM Peripherals datasheet:

    The ERR field is set when the slave fails to acknowledge either
    its address or a data byte written to it.

So when the controller doesn't receive an ack, it sets ERR and raises
an interrupt. In other words, the whole message is not sent.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
drivers/i2c/busses/i2c-bcm2835.c